#ifndef _GX_UTILS_H
#define _GX_UTILS_H

#include <glib.h>
#include "gntxmms.h"

#define P_WIDTH   6

typedef struct
{
	int mlibid;
	char *title;
	char *artist;
	char *url;
	long duration;
	int ref;
} SongInfo;

xmmsc_connection_t *gx_init();
const char *gx_song_info(int id, const char *format);
const char *gx_song_artist(int id);
const char *gx_song_title(int id);
char *gx_song_url(int id);
int gx_current();
void gx_play();
void gx_stop();
void gx_pause();
void gx_play_next();
void gx_play_prev();
void gx_seek(int id, gboolean relative);
void gx_jump(int id);
void gx_move(int oldp, int newp);
char *gx_info(int id);
void gx_add(const char*, gboolean recursive);
char *gx_format_url(const char *url, GFileTest test);

GList *gx_list(const char *format);
SongInfo *gx_song_info_st(int id);
void gx_song_info_ref(SongInfo *info);
SongInfo *gx_song_info_unref(SongInfo *info);

extern GHashTable *songs;
#endif

